<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    :root {
      font-size: 32px;
    }

    body {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      min-height: 100vh;
      font-family: Helvetica;
    }

    #container {
      width: 600px;
    }

    h1 {
      margin: 0;
      letter-spacing: -2px;
    }

    span {
      position: relative;
      overflow: hidden;
      /* background-color: #666; */
      top: .8rem;
      animation: .8s switch-up ease-in-out forwards;
    }

    i {
      font-style: normal;
      position: relative;
      top: 2rem;
      animation: .5s switch-up ease-in-out forwards;
    }

    p {
      font-size: .9rem;
      color: #666;
      line-height: 1.3rem;
      position: relative;
      top: 0.8rem;
      opacity: 0;
      animation: .5s switch-up ease-out forwards, .5s fade-in ease-out forwards;
      animation-delay: .8s;
    }

    @keyframes switch-up {
      to {
        top: 0rem;
      }
    }

    @keyframes fade-in {
      to {
        opacity: 1;
      }
    }


    /* 文字动画 */
    span:nth-of-type(1) i {
      animation-delay: 0s;
    }

    span:nth-of-type(2) i {
      animation-delay: 0.1s;
    }

    span:nth-of-type(3) i {
      animation-delay: .2s;
    }

    span:nth-of-type(4) i {
      animation-delay: .3s;
    }

    span:nth-of-type(5) i {
      animation-delay: .4s;
    }

    span:nth-of-type(6) i {
      animation-delay: .5s;
    }


    /* 文字的盒子的动画 */
    span:nth-of-type(1) {
      animation-delay: 0s;
    }

    span:nth-of-type(2) {
      animation-delay: 0.1s;
    }

    span:nth-of-type(3) {
      animation-delay: .2s;
    }

    span:nth-of-type(4) {
      animation-delay: .3s;
    }

    span:nth-of-type(5) {
      animation-delay: .4s;
    }

    span:nth-of-type(6) {
      animation-delay: .5s;
    }
  </style>
</head>

<body>

  <div id="container">
    <h1>
      <span><i>The</i></span>
      <span><i>best</i></span>
      <span><i>products</i></span>
      <span><i>start</i></span>
      <span><i>with</i></span>
      <span><i>Sketch</i></span>
    </h1>

    <p>
      Create, prototype, collaborate, and bring your ideas to life with the design platform used by over one million
      people — from freelancers, to the world’s largest teams.
    </p>
  </div>
</body>

</html>